function [ stats ] = dataset_stats(dataset)
load_settings;
data = getData(dataset);

% Possible dataset names:
% SANDBOX_RUN1  = Original dataset labeled by WashU ppl. 11 cameras
% SANDBOX_RUN2  = 2nd dataset labeled by WashU ppl. 39 cameras
% LIVE_MTURK    = Results from live run
% ITER_DATA     = Iterative data from Abby
% SPECIAL_ITER  = Iterative with random negative examples

stats = struct('dataset', dataset, 'num_cams', 0, 'cam_ids', [], 'imgs_per_cam', [], ...
               'num_imgs_total', 0, 'num_pos_ex', 0, 'num_neg_ex', 0);
stats.num_cams = size(data,1);

for ix = 1:size(data,1)
    stats.cam_ids(ix) = data(ix,1).cam_id;
    stats.imgs_per_cam(ix) = 0;
    for jx = 1:size(data,2)
        if ~isempty(data(ix,jx).cam_id)
            stats.imgs_per_cam = stats.imgs_per_cam + 1;
            stats.num_pos_ex = stats.num_pos_ex + size(data(ix,jx).ppl_rects, 1);
            stats.num_neg_ex = stats.num_neg_ex + size(data(ix,jx).bg_rects, 1);
        end
    end
end
stats.num_imgs_total = sum(stats.imgs_per_cam);

save([stats_root dataset '_stats.mat'], 'stats');
disp('Saving stats');

end
            

